    {  Petrova Tatjana
       2012 / 12 / 08
       This program  draws 400 buttons.}
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  arr : array [0..19] of TButton;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
var i,j : integer;
begin
  for j:=0 to 19 do
  begin
    for i := 0 to 19 do
    begin
      arr[i] := TButton.Create(Form1);
      arr[i].Width := 20;
      arr[i].Height := 20;
      arr[i].Parent := Form1;
      arr[i].Top := 20*(j mod 20);
      arr[i].Left := 20*(i mod 20);
   end;
  end;

end;

end.

